﻿using AspireFyh.ApiService.Context;
using AspireFyh.ApiService.Entities;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;

namespace AspireFyh.ApiService.Services;

public class AccountService:IAccountService
{
    private readonly MyDbContext context;

    public AccountService(MyDbContext context)
    {
        this.context = context;
    }
    public async Task<IEnumerable<Account>> GetAccounts()
    {
        return await context.Accounts.ToListAsync();
    }
}